package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.math.BigDecimal;


/**
 * The persistent class for the CI_IMAGENES database table.
 * 
 */
@Entity
@Table(name="CI_IMAGENES")
public class CiImagene implements Serializable {
	private static final long serialVersionUID = 1L;
	private long imgRefnum;
	private String errorCode;
	private String keyfileOid;
	private BigDecimal numPag;
	private BigDecimal partidaRefnum;
	private String tipoObjeto;
	private CiEntidad ciEntidad;

    public CiImagene() {
    }


	@Id
	@GeneratedValue(strategy=GenerationType.AUTO)
	@Column(name="IMG_REFNUM", unique=true, nullable=false)
	public long getImgRefnum() {
		return this.imgRefnum;
	}

	public void setImgRefnum(long imgRefnum) {
		this.imgRefnum = imgRefnum;
	}


	@Column(name="ERROR_CODE", length=6)
	public String getErrorCode() {
		return this.errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}


	@Column(name="KEYFILE_OID", length=24)
	public String getKeyfileOid() {
		return this.keyfileOid;
	}

	public void setKeyfileOid(String keyfileOid) {
		this.keyfileOid = keyfileOid;
	}


	@Column(name="NUM_PAG", precision=5)
	public BigDecimal getNumPag() {
		return this.numPag;
	}

	public void setNumPag(BigDecimal numPag) {
		this.numPag = numPag;
	}


	@Column(name="PARTIDA_REFNUM")
	public BigDecimal getPartidaRefnum() {
		return this.partidaRefnum;
	}

	public void setPartidaRefnum(BigDecimal partidaRefnum) {
		this.partidaRefnum = partidaRefnum;
	}


	@Column(name="TIPO_OBJETO", length=8)
	public String getTipoObjeto() {
		return this.tipoObjeto;
	}

	public void setTipoObjeto(String tipoObjeto) {
		this.tipoObjeto = tipoObjeto;
	}


	//bi-directional many-to-one association to CiEntidad
    @ManyToOne
	@JoinColumn(name="ENT_REFNUM", nullable=false)
	public CiEntidad getCiEntidad() {
		return this.ciEntidad;
	}

	public void setCiEntidad(CiEntidad ciEntidad) {
		this.ciEntidad = ciEntidad;
	}
	
}